home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Unix / CNews / Source / libstdio / Makefile < prev    next >
Encoding:
Makefile  |  1991-06-27  |  1.2 KB  |  42 lines

  1. SRC=fgets.c fputs.c rdwr.c
  2. OBJ=fgets.o fputs.o rdwr.o
  3. # PTR_TYPE is the type of _ptr in stdio.h, if not "char *"
  4. DEFINES = '-DPTR_TYPE=unsigned char *' -I../include
  5. COPTS = -O
  6. CFLAGS = $(DEFINES) $(COPTS)
  7. LINTFLAGS = $(DEFINES) -ha
  8. LIBS = ../libcnews.a
  9. # workaround for System V make bug
  10. SHELL = /bin/sh
  11.  
  12. u:    $(OBJ)
  13.     ar ruv ../libcnews.a $(OBJ)
  14.  
  15. all:    $(OBJ) stdiock.stock stdiock.fast runtrials
  16.  
  17. trials:    all
  18.     chmod +x runtrials
  19.     : run first with stdout directed to a plain file
  20.     ./runtrials >junk
  21.     : and again with stdout directed to a tty, we hope.
  22.     : do not panic.  you can ignore the output of runtrials.
  23.     : only its exit status really matters.
  24.     ./runtrials
  25.     rm stdiock.stock stdiock.fast junk
  26.  
  27. lint:
  28.     lint $(LINTFLAGS) $(SRC) stdiock.c
  29. lintport:
  30.     lint -p $(LINTFLAGS) $(SRC) stdiock.c
  31.  
  32. stdiock.stock: stdiock.o $(LIBS)
  33.     : search -lc before libcnews.a to get stock stdio
  34.     : -n is an attempt to force static loading on shared-library systems
  35.     $(CC) $(CFLAGS) $(LDFLAGS) -n stdiock.o $(PRE) -lc $(LIBS) $(POST) -o $@
  36. stdiock.fast: stdiock.o $(OBJ) $(LIBS)
  37.     : load *.o by hand to get tuned stdio
  38.     $(CC) $(CFLAGS) $(LDFLAGS) stdiock.o $(OBJ) $(PRE) $(LIBS) $(POST) -o $@
  39.  
  40. clean:
  41.     rm -f *.o stdiock stdiock.fast stdiock.stock junk *mon.out
  42.